﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using NUnit.Framework;
using Guia.Core;
using Guia.Elements;
using WpfTestApplication;

namespace NUnitTests{
    /// <summary>
    /// Summary description for PasswordBoxTest
    /// </summary>
    [TestFixture]
    public class PasswordBoxTest : AbstractWindowTest
    {
        [Test]
        public void TestSetValue()
        {
            PasswordBox passwordBox = window.Get<PasswordBox>("passwordBox1");
            passwordBox.Value = "test";
        }

        [Test,ExpectedException(typeof(OperationNotSupportedException))]
        public void TestSetValueDisabled()
        {
            PasswordBox passwordBox = window.Get<PasswordBox>("passwordBox2");
            passwordBox.Value = "test";
        }
        
        protected override Type TestWindowType()
        {
            return typeof(PasswordBoxTestWindow);
        }

        protected override string TestWindowName()
        {
            return "PasswordBoxTestWindow";
        }
    }
}
